package com.example.teesystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName t_issue
 */
@TableName(value ="t_issue")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Issue implements Serializable{
    /**
     * 自增（key）
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 问题
     */
    @TableField(value = "question")
    private String question;

    /**
     * 选项A
     */
    @TableField(value = "selection_A")
    private String selectionA;

    /**
     * 选项B
     */
    @TableField(value = "selection_B")
    private String selectionB;

    /**
     * 选项C
     */
    @TableField(value = "selection_C")
    private String selectionC;

    /**
     * 选项D
     */
    @TableField(value = "selection_D")
    private String selectionD;

    /**
     * 正确答案
     */
    @TableField(value = "answer")
    private String answer;

    /**
     * 知识点列表
     */
    @TableField(value = "knowledge_list")
    private String knowledgeList;

    /**
     * 所属科目
     */
    @TableField(value = "course_id")
    private Integer courseId;

    /**
     * 题目相关文件下载地址
     */
    @TableField(value = "url")
    private String url;

    /**
     * 难度系数：由易到难1-5
     */
    @TableField(value = "difficulty")
    private Integer difficulty;

    /**
     * 类型（0：训练题目，1：考试题目）
     */
    @TableField(value = "training_exam")
    private Integer trainingExam;

    /**
     * 0：判断 1：填空 2：单选 3：多选 4：简答
     */
    @TableField(value = "type")
    private Integer type;

    /**
     * 题目解析
     */
    @TableField(value = "analysis")
    private String analysis;

    /**
     * 0未删除，1已删除
     */
    @TableLogic
    @TableField(value = "is_delete")
    private Integer isDelete;

    /**
     * 上传者UID
     */
    @TableField(value = "upload_uid")
    private Integer uploadUid;

    /**
     * 作为考试题目被引用次数
     */
    @TableField(value = "reference_num")
    private Integer referenceNum;

    @TableField(value = "chapter_id")
    private Integer chapterId;

    @TableField(value = "issue_type")
    private String issueType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time", fill = FieldFill.INSERT_UPDATE)
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}